package com.cmc.cloud.cmclink.doc.vo.multimodaltransport.localcost;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

/**
 * Multi Local COST费用 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class MultiLocalCostBaseVO {

    @Schema(description = "提单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27596")
    @NotBlank(message = "{multilocalcost.blnoId.notblank}")
    private Long blnoId;

    @Schema(description = "进出口类型", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 2, example = "2")
    @NotBlank(message = "{multilocalcost.imextype.notblank}")
    @Length(max = 2, message = "{multilocalcost.imextype.length}")
    @Pattern(regexp = "^(IM|EX)$", message = "{multilocalcost.imExType.pattern}")
    private String imExType;

    @Schema(description = "费用代码", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 6)
    @NotBlank(message = "{multilocalcost.chargeCode.notblank}")
    @Length(max = 6, message = "{multilocalcost.chargeCode.length}")
    private String chargeCode;

    @Schema(description = "计费维度N=按箱计费，Y=按票计费", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 1)
    @NotBlank(message = "{multilocalcost.per.notblank}")
    @Length(max = 1, message = "{multilocalcost.per.length}")
    @Pattern(regexp = "^(N|Y)$", message = "{multilocalcost.per.pattern}")
    private String per;

    @Schema(description = "箱型", maxLength = 2, example = "1")
    private String cntrType;

    @Schema(description = "箱尺寸", maxLength = 2)
    private String cntrSize;

    @Schema(description = "货类", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 5, example = "1")
    @NotBlank(message = "{multilocalcost.cargotype.notblank}")
    private String cargoType;

    @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{multilocalcost.quantity.notnull}")
    private Integer quantity;

    @Schema(description = "费率", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{multilocalcost.rate.notnull}")
    private BigDecimal rate;

    @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{multilocalcost.amount.notnull}")
    private BigDecimal amount;

    @Schema(description = "币种", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 3)
    @NotBlank(message = "{multilocalcost.currency.notblank}")
    private String currency;

    @Schema(description = "付费方式", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 1)
    @NotBlank(message = "{multilocalcost.payment.notblank}")
    private String payment;

    @Schema(description = "供应商", maxLength = 50)
    private String supplier;

    @Schema(description = "供应商名称", maxLength = 50)
    private String supplierName;

    @Schema(description = "oog", maxLength = 255)
    private String oog;

    @Schema(description = "转财务", requiredMode = Schema.RequiredMode.REQUIRED, example = "27086")
    private Boolean toAccount;

    @Schema(description = "记录类型", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 10, example = "2")
    @NotBlank(message = "{multilocalcost.recordtype.notblank}")
    private String recordType;

    @Schema(description = "原始费用id", example = "10774")
    private Long originalId;

    @Schema(description = "费用发生港", maxLength = 5)
    @Length(max = 5, message = "{multilocalcost.localport.length}")
    @NotBlank(message = "{multilocalcost.localPort.notblank}")
    private String localPort;

    @Schema(description = "0：未红冲，1：红冲", requiredMode = Schema.RequiredMode.REQUIRED, maxLength = 1, example = "1")
    private String redStatus;

}
